home *** CD-ROM | disk | FTP | other *** search
- Path: erich.triumf.ca!bennett
- From: bennett@erich.triumf.ca (P.Bennett)
- Newsgroups: comp.lang.c
- Subject: Re: floating point dynamic array
- Date: 30 Jan 1996 08:14 PST
- Organization: TRIUMF: Tri-University Meson Facility
- Distribution: world
- Message-ID: <30JAN199608140261@erich.triumf.ca>
- References: <310EFD40.2D03@se.cuhk.hk>
- NNTP-Posting-Host: erich.triumf.ca
- News-Software: VAX/VMS VNEWS 1.50
-
- In article <310EFD40.2D03@se.cuhk.hk>, Lawrence Xiao <hkshiou3@se.cuhk.hk> writes...
- >Hi all,
- >
- >I try to use dynamic array to store series of floating point.
- >But error message returns. However, there won't be any problem
- >when I change the all the declaration from floating point
- >to integer.
- >
- >The message I get is:
- >"scanf: floating point formats not linked"
- >"abnormal program termination"
- >
- You are probably using a Borland compiler. This results from a well-known (and
- documented) feature to save a couple of K of code. If the linker doesn't see
- any float operations, it doesn't link the support code that scanf() needs.
- Simply reading floats with scanf(), and storing them is not sufficient to make
- the linker link the required code.
-
- A readme file that came with the compiler should have some info on this,
- including a suggestion to add the lines:
- extern _floatconvert;
- #pragma extref _floatconvert;
- or similar (don't have the info handy...)
-
- Or add a dummy float operation - call sin(), or other math function.
-
- This problem shouldn't occur in a Real program that does some calculations on
- the flaots it reads in.
-
-
- Peter Bennett VE7CEI | Vessels shall be deemed to be in sight
- Internet: bennett@triumf.ca | of one another only when one can be
- Packet: ve7cei@ve7kit.#vanc.bc.ca | observed visually from the other
- TRIUMF, Vancouver, B.C., Canada | ColRegs 3(k)
- GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
-
-